package com.mall.service;

import com.mall.entity.Address;
import com.mall.exception.DeleteException;
import com.mall.exception.InsertException;

import java.util.List;

public interface AddressService {

    /**
     * 新增收货地址
     */
    public Integer addAddress(Address address) throws InsertException;

    /**
     * 获取用户所有收货地址
     * @param userId 用户Id
     * @return
     */
    List<Address> getByUserId(Long userId);

    /**
     * 根据地址Id删除
     * @param id 地址信息id
     */
    void deleteById(Integer id) throws DeleteException;

}
